package com.service.serviceImpl;

import com.mapper.EmployeeMapper;
import com.service.IEmployeeService;
import com.service.IProductService;
import com.vo.employeeVo.EmployeeListRequestVo;
import com.vo.employeeVo.EmployeeListResponseVo;
import com.vo.employeeVo.addEmployeeVo;
import com.vo.employeeVo.updateEmployeeVo;
import org.mybatis.logging.Logger;
import org.mybatis.logging.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author hl
 * @Date
 * @Describe 员工相关功能实现
 */
@Service
public class EmployeeServiceImpl implements IEmployeeService {
    Logger logger = LoggerFactory.getLogger(IEmployeeService.class);

    @Resource
    EmployeeMapper employeeMapper;

    @Override
    public List<EmployeeListResponseVo> getEmployeeList(EmployeeListRequestVo vo) {
        List<EmployeeListResponseVo> list = employeeMapper.getEmployeeList(vo);
        return list;
    }

    @Override
    public void updateEmployee(updateEmployeeVo vo) {
        vo.setUpdateTime(LocalDateTime.now());
        employeeMapper.updateEmployee(vo);
    }

    @Override
    public void addEmployee(addEmployeeVo addVo) {

    }
}
